package com.aircjm.thinkinjava.part3;

/**
 * 创建一个包含一个float域的类，并用这个类来展示别名机制
 */
public class AssigonmentPractice {
    public static void main(String[] args) {
        Apple apple1 = new Apple();
        Apple apple2 = new Apple();

        apple1.aFloat = 10;
        apple2.aFloat = 20;
        System.out.println(apple1.aFloat);
        System.out.println(apple2.aFloat);
        System.out.println("------------------");

        apple2 = apple1;

        apple1.aFloat = 200;

        System.out.println(apple1.aFloat);
        System.out.println(apple2.aFloat);
        System.out.println("------------------");

    }

}

class Apple {
    float aFloat;
}